# Maintainer: George Rawlinson <grawlinson@archlinux.org>
# Contributor: Andrzej Giniewicz <gginiu@gmail.com>

pkgname=dhex
pkgver=0.69
pkgrel=3
pkgdesc='A ncurses-based hex editor with a diff mode'
arch=('loong64' 'x86_64')
url='https://www.dettus.net/dhex'
license=('GPL2')
depends=('ncurses')
source=(
  "${url}/${pkgname}_${pkgver}.tar.gz"
  'Makefile'
)
sha512sums=('76115fd6b67bf1f61af6acfbc4dac9ac54c14aeb291de6a190aa1ffa599cf8b3e40a422ed34c237cf1f5c7406b07e38e38fb1c9c9dd36ce93d05265238060ba0'
            'c4ea31f39cc3b019d8358e6382d84364291c2197674dbcd09b65865a890c4d1dee1a919b9af842815aa7a37dd118e4261c3a0be29ee1477cd778f508536a1cca')
b2sums=('26bfeaffc65b0f3b0193ee940da3ad866ea1354d0e5bec021a68a6c515da956500bfd7561ba675d0a67526d09b1a72e8372ee7bb52ec372f2b59249313cf77c6'
        '5266d17af308a53d417fe3aca6be74c6fa56b06072f82db581e20cbdf971890492d84254867cdac2d34c7e4a4011c55c10fcecd81933d8c6c8670eff8655a6d2')

prepare() {
  # use cleaner Makefile
  cp -f "$srcdir/Makefile" "${pkgname}_${pkgver}"
}

build() {
  cd "${pkgname}_${pkgver}"

  make
}

package() {
  cd "${pkgname}_${pkgver}"

  make DESTDIR="$pkgdir" install
}
